Criterion B Details

# Default ecosystem code for template development.
# This line is replaced by build_ecosystem_pages.py for each ecosystem.
ecosystem_code = 'Bosque Andino Seco'

Import Python modules.

import os
import yaml
from pathlib import Path
from lonboard import Map
from rle.core import Ecosystems, criterion_b_status, rle_category
from rle.core.eoo import make_eoo
from rle.core.aoo import make_aoo_grid

Load the country config file.

project_root = os.environ.get('PIXI_PROJECT_ROOT', str(Path('..').resolve()))
config_path = Path(project_root) / 'config' / 'country_config.yaml'
with open(config_path) as f:
    config = yaml.safe_load(f)

# Ecosystem index (the COG pixel value for this ecosystem), looked up by code
# from the canonical index table. Absent if the index has not been built yet.
import csv
ecosystem_index = None
index_csv = Path(project_root) / 'config' / 'ecosystems' / 'index.csv'
if index_csv.exists():
    with open(index_csv) as f:
        for row in csv.DictReader(f):
            if row['code'] == ecosystem_code:
                ecosystem_index = int(row['index'])
                break

Load & Filter Ecosystem Data

Load data for all the ecosystems.

import sys
# Shared config helpers live in scripts/; make them importable from here.
sys.path.insert(0, str(Path(project_root) / 'scripts'))
from _config import ensure_vector_source

source = config['ecosystem_source']
# ecosystem_code_column is optional: fall back to the name column.
ecosystem_column = source.get('ecosystem_code_column') or source.get('ecosystem_name_column')
# Prefer the ecosystem-sorted `optimized_data` copy when configured, so that
# filtering to one ecosystem uses parquet predicate pushdown instead of loading
# the whole national map into memory. Falls back to `data`.
ecosystems = Ecosystems.from_file(
    ensure_vector_source(source.get('optimized_data') or source['data']),
    ecosystem_column=ecosystem_column,
    ecosystem_name_column=source.get('ecosystem_name_column'),
    functional_group_column=source.get('functional_group_column')
)

Filter by the Bosque Andino Seco and check the number of features.

ecosystem = ecosystems.filter(ecosystem_code)
has_data = ecosystem.size() > 0
print(f'{ecosystem.size() = }')
if not has_data:
    from IPython.display import Markdown, display
    display(Markdown(
        f'**No spatial data found for {ecosystem_code}.** '
        f'Criterion B calculations are skipped.'
    ))
ecosystem.size() = 63

Extent of Occurrence (EOO) (subcriterion B1)

Extent of occurrence (EOO). The EOO of an ecosystem is the area (km2) of a minimum convex polygon – the smallest polygon in which no internal angle exceeds 180° that encompasses all known current spatial occurrences of the ecosystem type.

The minimum convex polygon (also known as a convex hull) must not exclude any areas, discontinuities or disjunctions, regardless of whether the ecosystem can occur in those areas or not. Regions such as oceans (for terrestrial ecosystems), land (for coastal or marine ecosystems), or areas outside the study area (such as in a different country) must remain included within the minimum convex polygon to ensure that this standardised method is comparable across ecosystem types. In addition, these features contribute to spreading risks across the distribution of the ecosystem by making different parts of its distribution more spatially independent.

Calculate EOO

Start by calculating the convex hull of the ecosystem’s distribution.

import geopandas as gpd

if has_data:
    ecosystem_geometry = ecosystem.geometry.union_all()
    gdf_ecosystem_polygons = gpd.GeoDataFrame(geometry=[ecosystem_geometry], crs=ecosystem.geometry.crs)
    hull = ecosystem_geometry.convex_hull
    gdf_hull = gpd.GeoDataFrame(geometry=[hull], crs=ecosystem.geometry.crs)

Display the ecosystem’s distribution and the convex hull.

from lonboard import Map, PolygonLayer
from rle.core.viz import smart_map

if has_data:
    eoo_hull = make_eoo(ecosystem).compute()
    display(smart_map([eoo_hull, ecosystem]))
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(
if has_data:
    hull_ea = gdf_hull.to_crs("ESRI:54034")
    eoo = hull_ea.geometry.iloc[0].area / 1e6
    print(f'EOO is {eoo:.1f} km2')
EOO is 158276.5 km2

Then calculate the area of the convex hull polygon.

Direct calculation of EOO

EOO can also be calculated directly using …

if has_data:
    ecosystem.eoo

Verify that the area returned by calling make_eoo(ecosystem).compute().area_km2 is the same as the area of the convex hull polygon.

if has_data:
    assert ecosystem.eoo == eoo

Area of Occupancy (AOO) (subcriterion B2)

The protocol for this adjustment includes the following steps:

  1. Intersect AOO grid with the ecosystem’s distribution map.
  2. Calculate extent of the ecosystem type in each grid cell (area) and sum these areas to obtain the total ecosystem area (total area).
  3. Arrange grid cells in ascending order based on their area (smaller first). Calculate accumulated sum of area per cell (cumulative area).
  4. Calculate cumulative proportion by dividing cumulative area by total area (cumulative proportion takes values between 0 and 1)
  5. Calculate AOO by counting the number of cells with a cumulative proportion greater than 0.01 (i.e. exclude cells that in combination account for up to 1% of the total mapped extent of the ecosystem type).

AOO Calculation Details

Intersect AOO grid and ecosystem map

  1. Intersect AOO grid with the ecosystem’s distribution map
from pathlib import Path
from rle.core.aoo import make_aoo_grid_cached

if has_data:
    # Prefer a prebuilt grid cache (e.g. a gs:// URI) so the national AOO grid
    # is not recomputed during CI renders — computing it from the full national
    # ecosystem map peaks at many GB of RAM. Fall back to a local cache when no
    # prebuilt cache is configured. Build one with `pixi run build-caches`.
    cache_path = (
        source.get('aoo_grid_cache_url')
        or (Path(project_root) / '.cache' / 'aoo_grid.parquet')
    )
    aoo_grid = make_aoo_grid_cached(ecosystems, cache_path=cache_path)
    aoo_grid_filtered = aoo_grid.filter_by_ecosystem(ecosystem_code)

Visualize variations in the AOO grid.

from matplotlib.colors import LinearSegmentedColormap
from lonboard.colormap import apply_continuous_cmap
from rle.core.aoo import slugify_ecosystem_name

ecosystem_column = slugify_ecosystem_name(ecosystem_code)
if has_data:
    cmap = LinearSegmentedColormap.from_list("white_red", ["white", "red"])
    values = aoo_grid_filtered.grid_cells[ecosystem_column].values
    normalized = (values - values.min()) / (values.max() - values.min())
    colors = apply_continuous_cmap(normalized, cmap)
    display(smart_map([(aoo_grid_filtered, {"get_fill_color": colors}), ecosystem]))
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(

Calculate grid cell area and total area

  1. Calculate extent of the ecosystem type in each grid cell (area) and sum these areas to obtain the total ecosystem area (total area).
if has_data:
    keep = ['geometry', 'grid_col', 'grid_row', ecosystem_column]
    gdf = aoo_grid_filtered.grid_cells[keep]
    display(gdf)
geometry grid_col grid_row Bosque_Andino_Seco
0 POLYGON ((-77.52461 0.81396, -77.52461 0.90441... -864 9 0.002661
1 POLYGON ((-77.52461 0.99486, -77.52461 1.08531... -864 11 0.025182
2 POLYGON ((-77.52461 1.08531, -77.52461 1.17576... -864 12 0.012922
3 POLYGON ((-77.52461 1.17576, -77.52461 1.26622... -864 13 0.000195
4 POLYGON ((-77.43478 0.99486, -77.43478 1.08531... -863 11 0.059150
5 POLYGON ((-77.43478 1.08531, -77.43478 1.17576... -863 12 0.021819
6 POLYGON ((-77.43478 1.17576, -77.43478 1.26622... -863 13 0.008704
7 POLYGON ((-77.34495 0.99486, -77.34495 1.08531... -862 11 0.006739
8 POLYGON ((-77.34495 1.08531, -77.34495 1.17576... -862 12 0.005499
9 POLYGON ((-77.25511 1.17576, -77.25511 1.26622... -861 13 0.009312
10 POLYGON ((-77.25511 1.26622, -77.25511 1.35668... -861 14 0.006884
11 POLYGON ((-77.16528 1.26622, -77.16528 1.35668... -860 14 0.036245
12 POLYGON ((-77.16528 1.35668, -77.16528 1.44714... -860 15 0.007198
13 POLYGON ((-74.56017 3.98235, -74.56017 4.073, ... -831 44 0.002998
14 POLYGON ((-74.47034 3.8917, -74.47034 3.98235,... -830 43 0.017348
15 POLYGON ((-74.47034 3.98235, -74.47034 4.073, ... -830 44 0.069540
16 POLYGON ((-74.29067 4.25434, -74.29067 4.34503... -828 47 0.004164
17 POLYGON ((-74.29067 4.52643, -74.29067 4.61715... -828 50 0.114501
18 POLYGON ((-74.29067 4.61715, -74.29067 4.70788... -828 51 0.080218
19 POLYGON ((-74.20084 4.52643, -74.20084 4.61715... -827 50 0.021774
20 POLYGON ((-73.84152 5.07091, -73.84152 5.1617,... -823 56 0.014746
21 POLYGON ((-73.84152 5.1617, -73.84152 5.2525, ... -823 57 0.000900
22 POLYGON ((-73.75168 5.07091, -73.75168 5.1617,... -822 56 0.002908
23 POLYGON ((-73.75168 5.43414, -73.75168 5.52498... -822 60 0.003695
24 POLYGON ((-73.66185 5.43414, -73.66185 5.52498... -821 60 0.002983
25 POLYGON ((-73.66185 5.52498, -73.66185 5.61584... -821 61 0.000009
26 POLYGON ((-73.57202 5.52498, -73.57202 5.61584... -820 61 0.042607
27 POLYGON ((-73.57202 5.61584, -73.57202 5.70671... -820 62 0.002645
28 POLYGON ((-73.48219 5.52498, -73.48219 5.61584... -819 61 0.010768
29 POLYGON ((-73.48219 5.61584, -73.48219 5.70671... -819 62 0.014762
30 POLYGON ((-73.30253 5.52498, -73.30253 5.61584... -817 61 0.004234
31 POLYGON ((-73.2127 5.52498, -73.2127 5.61584, ... -816 61 0.000070
32 POLYGON ((-73.2127 8.16621, -73.2127 8.25756, ... -816 90 0.025348
33 POLYGON ((-73.2127 8.25756, -73.2127 8.34893, ... -816 91 0.003603
34 POLYGON ((-73.12286 5.61584, -73.12286 5.70671... -815 62 0.004302
35 POLYGON ((-73.12286 5.70671, -73.12286 5.79759... -815 63 0.007296
36 POLYGON ((-73.12286 8.16621, -73.12286 8.25756... -815 90 0.018497
37 POLYGON ((-72.76354 5.88849, -72.76354 5.9794,... -811 65 0.005313
38 POLYGON ((-72.67371 10.73256, -72.67371 10.824... -810 118 0.014985
39 POLYGON ((-72.67371 10.82458, -72.67371 10.916... -810 119 0.002342
40 POLYGON ((-72.58387 6.25222, -72.58387 6.34319... -809 69 0.002048
41 POLYGON ((-72.58387 6.34319, -72.58387 6.43418... -809 70 0.007767
42 POLYGON ((-72.58387 6.52518, -72.58387 6.6162,... -809 72 0.007937
43 POLYGON ((-72.58387 7.16266, -72.58387 7.2538,... -809 79 0.018317
44 POLYGON ((-72.58387 7.2538, -72.58387 7.34496,... -809 80 0.020115
45 POLYGON ((-72.58387 7.34496, -72.58387 7.43613... -809 81 0.006023
46 POLYGON ((-72.58387 7.43613, -72.58387 7.52733... -809 82 0.028529
47 POLYGON ((-72.58387 10.73256, -72.58387 10.824... -809 118 0.001264
48 POLYGON ((-72.58387 10.82458, -72.58387 10.916... -809 119 0.003918
49 POLYGON ((-72.49404 6.25222, -72.49404 6.34319... -808 69 0.007228
50 POLYGON ((-72.49404 6.52518, -72.49404 6.6162,... -808 72 0.004122

The column Bosque_Andino_Seco contains the (fractional) area of the ecosystem in each grid cell.

Sum up the areas of each grid cell to get the total area.

if has_data:
    total_area = gdf[ecosystem_column].sum()
    display(total_area)
np.float64(0.8023323662422783)

Calculate cumulative area

  1. Arrange grid cells in ascending order based on their area (smaller first). Calculate accumulated sum of area per cell (cumulative area).
if has_data:
    gdf = gdf.sort_values(by=ecosystem_column)
    gdf["cumulative_area"] = gdf[ecosystem_column].cumsum()
    display(gdf)
geometry grid_col grid_row Bosque_Andino_Seco cumulative_area
25 POLYGON ((-73.66185 5.52498, -73.66185 5.61584... -821 61 0.000009 0.000009
31 POLYGON ((-73.2127 5.52498, -73.2127 5.61584, ... -816 61 0.000070 0.000079
3 POLYGON ((-77.52461 1.17576, -77.52461 1.26622... -864 13 0.000195 0.000274
21 POLYGON ((-73.84152 5.1617, -73.84152 5.2525, ... -823 57 0.000900 0.001174
47 POLYGON ((-72.58387 10.73256, -72.58387 10.824... -809 118 0.001264 0.002438
40 POLYGON ((-72.58387 6.25222, -72.58387 6.34319... -809 69 0.002048 0.004485
39 POLYGON ((-72.67371 10.82458, -72.67371 10.916... -810 119 0.002342 0.006828
27 POLYGON ((-73.57202 5.61584, -73.57202 5.70671... -820 62 0.002645 0.009473
0 POLYGON ((-77.52461 0.81396, -77.52461 0.90441... -864 9 0.002661 0.012134
22 POLYGON ((-73.75168 5.07091, -73.75168 5.1617,... -822 56 0.002908 0.015042
24 POLYGON ((-73.66185 5.43414, -73.66185 5.52498... -821 60 0.002983 0.018025
13 POLYGON ((-74.56017 3.98235, -74.56017 4.073, ... -831 44 0.002998 0.021023
33 POLYGON ((-73.2127 8.25756, -73.2127 8.34893, ... -816 91 0.003603 0.024626
23 POLYGON ((-73.75168 5.43414, -73.75168 5.52498... -822 60 0.003695 0.028321
48 POLYGON ((-72.58387 10.82458, -72.58387 10.916... -809 119 0.003918 0.032239
50 POLYGON ((-72.49404 6.52518, -72.49404 6.6162,... -808 72 0.004122 0.036362
16 POLYGON ((-74.29067 4.25434, -74.29067 4.34503... -828 47 0.004164 0.040525
30 POLYGON ((-73.30253 5.52498, -73.30253 5.61584... -817 61 0.004234 0.044759
34 POLYGON ((-73.12286 5.61584, -73.12286 5.70671... -815 62 0.004302 0.049061
37 POLYGON ((-72.76354 5.88849, -72.76354 5.9794,... -811 65 0.005313 0.054374
8 POLYGON ((-77.34495 1.08531, -77.34495 1.17576... -862 12 0.005499 0.059874
45 POLYGON ((-72.58387 7.34496, -72.58387 7.43613... -809 81 0.006023 0.065897
7 POLYGON ((-77.34495 0.99486, -77.34495 1.08531... -862 11 0.006739 0.072635
10 POLYGON ((-77.25511 1.26622, -77.25511 1.35668... -861 14 0.006884 0.079519
12 POLYGON ((-77.16528 1.35668, -77.16528 1.44714... -860 15 0.007198 0.086717
49 POLYGON ((-72.49404 6.25222, -72.49404 6.34319... -808 69 0.007228 0.093944
35 POLYGON ((-73.12286 5.70671, -73.12286 5.79759... -815 63 0.007296 0.101240
41 POLYGON ((-72.58387 6.34319, -72.58387 6.43418... -809 70 0.007767 0.109007
42 POLYGON ((-72.58387 6.52518, -72.58387 6.6162,... -809 72 0.007937 0.116944
6 POLYGON ((-77.43478 1.17576, -77.43478 1.26622... -863 13 0.008704 0.125649
9 POLYGON ((-77.25511 1.17576, -77.25511 1.26622... -861 13 0.009312 0.134960
28 POLYGON ((-73.48219 5.52498, -73.48219 5.61584... -819 61 0.010768 0.145728
2 POLYGON ((-77.52461 1.08531, -77.52461 1.17576... -864 12 0.012922 0.158650
20 POLYGON ((-73.84152 5.07091, -73.84152 5.1617,... -823 56 0.014746 0.173396
29 POLYGON ((-73.48219 5.61584, -73.48219 5.70671... -819 62 0.014762 0.188158
38 POLYGON ((-72.67371 10.73256, -72.67371 10.824... -810 118 0.014985 0.203143
14 POLYGON ((-74.47034 3.8917, -74.47034 3.98235,... -830 43 0.017348 0.220491
43 POLYGON ((-72.58387 7.16266, -72.58387 7.2538,... -809 79 0.018317 0.238808
36 POLYGON ((-73.12286 8.16621, -73.12286 8.25756... -815 90 0.018497 0.257305
44 POLYGON ((-72.58387 7.2538, -72.58387 7.34496,... -809 80 0.020115 0.277420
19 POLYGON ((-74.20084 4.52643, -74.20084 4.61715... -827 50 0.021774 0.299194
5 POLYGON ((-77.43478 1.08531, -77.43478 1.17576... -863 12 0.021819 0.321013
1 POLYGON ((-77.52461 0.99486, -77.52461 1.08531... -864 11 0.025182 0.346195
32 POLYGON ((-73.2127 8.16621, -73.2127 8.25756, ... -816 90 0.025348 0.371543
46 POLYGON ((-72.58387 7.43613, -72.58387 7.52733... -809 82 0.028529 0.400071
11 POLYGON ((-77.16528 1.26622, -77.16528 1.35668... -860 14 0.036245 0.436317
26 POLYGON ((-73.57202 5.52498, -73.57202 5.61584... -820 61 0.042607 0.478924
4 POLYGON ((-77.43478 0.99486, -77.43478 1.08531... -863 11 0.059150 0.538074
15 POLYGON ((-74.47034 3.98235, -74.47034 4.073, ... -830 44 0.069540 0.607614
18 POLYGON ((-74.29067 4.61715, -74.29067 4.70788... -828 51 0.080218 0.687832
17 POLYGON ((-74.29067 4.52643, -74.29067 4.61715... -828 50 0.114501 0.802332

Calculate cumulative proportion

  1. Calculate cumulative proportion by dividing cumulative area by total area (cumulative proportion takes values between 0 and 1)
if has_data:
    gdf["cumulative_proportion"] = gdf["cumulative_area"] / total_area
    display(gdf)
geometry grid_col grid_row Bosque_Andino_Seco cumulative_area cumulative_proportion
25 POLYGON ((-73.66185 5.52498, -73.66185 5.61584... -821 61 0.000009 0.000009 0.000012
31 POLYGON ((-73.2127 5.52498, -73.2127 5.61584, ... -816 61 0.000070 0.000079 0.000099
3 POLYGON ((-77.52461 1.17576, -77.52461 1.26622... -864 13 0.000195 0.000274 0.000342
21 POLYGON ((-73.84152 5.1617, -73.84152 5.2525, ... -823 57 0.000900 0.001174 0.001463
47 POLYGON ((-72.58387 10.73256, -72.58387 10.824... -809 118 0.001264 0.002438 0.003038
40 POLYGON ((-72.58387 6.25222, -72.58387 6.34319... -809 69 0.002048 0.004485 0.005591
39 POLYGON ((-72.67371 10.82458, -72.67371 10.916... -810 119 0.002342 0.006828 0.008510
27 POLYGON ((-73.57202 5.61584, -73.57202 5.70671... -820 62 0.002645 0.009473 0.011807
0 POLYGON ((-77.52461 0.81396, -77.52461 0.90441... -864 9 0.002661 0.012134 0.015124
22 POLYGON ((-73.75168 5.07091, -73.75168 5.1617,... -822 56 0.002908 0.015042 0.018748
24 POLYGON ((-73.66185 5.43414, -73.66185 5.52498... -821 60 0.002983 0.018025 0.022465
13 POLYGON ((-74.56017 3.98235, -74.56017 4.073, ... -831 44 0.002998 0.021023 0.026202
33 POLYGON ((-73.2127 8.25756, -73.2127 8.34893, ... -816 91 0.003603 0.024626 0.030693
23 POLYGON ((-73.75168 5.43414, -73.75168 5.52498... -822 60 0.003695 0.028321 0.035299
48 POLYGON ((-72.58387 10.82458, -72.58387 10.916... -809 119 0.003918 0.032239 0.040182
50 POLYGON ((-72.49404 6.52518, -72.49404 6.6162,... -808 72 0.004122 0.036362 0.045320
16 POLYGON ((-74.29067 4.25434, -74.29067 4.34503... -828 47 0.004164 0.040525 0.050509
30 POLYGON ((-73.30253 5.52498, -73.30253 5.61584... -817 61 0.004234 0.044759 0.055786
34 POLYGON ((-73.12286 5.61584, -73.12286 5.70671... -815 62 0.004302 0.049061 0.061148
37 POLYGON ((-72.76354 5.88849, -72.76354 5.9794,... -811 65 0.005313 0.054374 0.067770
8 POLYGON ((-77.34495 1.08531, -77.34495 1.17576... -862 12 0.005499 0.059874 0.074624
45 POLYGON ((-72.58387 7.34496, -72.58387 7.43613... -809 81 0.006023 0.065897 0.082131
7 POLYGON ((-77.34495 0.99486, -77.34495 1.08531... -862 11 0.006739 0.072635 0.090530
10 POLYGON ((-77.25511 1.26622, -77.25511 1.35668... -861 14 0.006884 0.079519 0.099110
12 POLYGON ((-77.16528 1.35668, -77.16528 1.44714... -860 15 0.007198 0.086717 0.108081
49 POLYGON ((-72.49404 6.25222, -72.49404 6.34319... -808 69 0.007228 0.093944 0.117089
35 POLYGON ((-73.12286 5.70671, -73.12286 5.79759... -815 63 0.007296 0.101240 0.126182
41 POLYGON ((-72.58387 6.34319, -72.58387 6.43418... -809 70 0.007767 0.109007 0.135863
42 POLYGON ((-72.58387 6.52518, -72.58387 6.6162,... -809 72 0.007937 0.116944 0.145755
6 POLYGON ((-77.43478 1.17576, -77.43478 1.26622... -863 13 0.008704 0.125649 0.156604
9 POLYGON ((-77.25511 1.17576, -77.25511 1.26622... -861 13 0.009312 0.134960 0.168210
28 POLYGON ((-73.48219 5.52498, -73.48219 5.61584... -819 61 0.010768 0.145728 0.181631
2 POLYGON ((-77.52461 1.08531, -77.52461 1.17576... -864 12 0.012922 0.158650 0.197736
20 POLYGON ((-73.84152 5.07091, -73.84152 5.1617,... -823 56 0.014746 0.173396 0.216115
29 POLYGON ((-73.48219 5.61584, -73.48219 5.70671... -819 62 0.014762 0.188158 0.234513
38 POLYGON ((-72.67371 10.73256, -72.67371 10.824... -810 118 0.014985 0.203143 0.253190
14 POLYGON ((-74.47034 3.8917, -74.47034 3.98235,... -830 43 0.017348 0.220491 0.274813
43 POLYGON ((-72.58387 7.16266, -72.58387 7.2538,... -809 79 0.018317 0.238808 0.297642
36 POLYGON ((-73.12286 8.16621, -73.12286 8.25756... -815 90 0.018497 0.257305 0.320696
44 POLYGON ((-72.58387 7.2538, -72.58387 7.34496,... -809 80 0.020115 0.277420 0.345767
19 POLYGON ((-74.20084 4.52643, -74.20084 4.61715... -827 50 0.021774 0.299194 0.372905
5 POLYGON ((-77.43478 1.08531, -77.43478 1.17576... -863 12 0.021819 0.321013 0.400099
1 POLYGON ((-77.52461 0.99486, -77.52461 1.08531... -864 11 0.025182 0.346195 0.431486
32 POLYGON ((-73.2127 8.16621, -73.2127 8.25756, ... -816 90 0.025348 0.371543 0.463078
46 POLYGON ((-72.58387 7.43613, -72.58387 7.52733... -809 82 0.028529 0.400071 0.498635
11 POLYGON ((-77.16528 1.26622, -77.16528 1.35668... -860 14 0.036245 0.436317 0.543810
26 POLYGON ((-73.57202 5.52498, -73.57202 5.61584... -820 61 0.042607 0.478924 0.596915
4 POLYGON ((-77.43478 0.99486, -77.43478 1.08531... -863 11 0.059150 0.538074 0.670637
15 POLYGON ((-74.47034 3.98235, -74.47034 4.073, ... -830 44 0.069540 0.607614 0.757309
18 POLYGON ((-74.29067 4.61715, -74.29067 4.70788... -828 51 0.080218 0.687832 0.857290
17 POLYGON ((-74.29067 4.52643, -74.29067 4.61715... -828 50 0.114501 0.802332 1.000000

Count AOO cells

  1. Calculate AOO by counting the number of cells with a cumulative proportion greater than 0.01 (i.e. exclude cells that in combination account for up to 1% of the total mapped extent of the ecosystem type).
if has_data:
    aoo = len(gdf[gdf["cumulative_proportion"] > 0.01])
    print(f'AOO is {aoo} cells')
AOO is 44 cells

AOO Calculation (direct call)

if has_data:
    aoo_count = ecosystem.aoo
    print(f'AOO: {aoo_count} grid cells')
AOO: 44 grid cells

Criterion B Summary

Criterion B status (spatial)
Vulnerable (VU) — Bosque Andino Seco (Bosque Andino Seco), index 23

Status reflects the spatial thresholds for EOO (B1) and AOO (B2) only. A final listing under B1/B2 additionally requires at least one of: (a) an observed or inferred continuing decline; (b) threatening processes likely to cause continuing decline within 20 years; or (c) few threat-defined locations — none of which are derived from the spatial metrics.

Sub-criterion Metric Value Category
B1 EOO 158277 km² Least Concern (LC)
B2 AOO 44 cells Vulnerable (VU)
Overall B — — Vulnerable (VU)